<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
</head>
<body>
	<script type="text/javascript">
		let data = {
			code : 200,
			data : [{
				name : "锂离子"
				age : 18
			},{
				name : "水公园"
				age : 18
			}]
		}
		console.log(data)//json对象格式

		//将json对象转换为json字符串 JSON.stringify(data)
		let a = JSON.stringify(data)
		console.log(a)

		//将json字符串转换为json对象 JSON.parse()
		let b = JSON.parse(a) 
		console.log(b)
	</script>
</body>
</html>